package com.example.bishe.controller.authentication;

/**
 * @Author yws
 * @Date 2022/3/18 9:34
 */

import com.alibaba.fastjson.JSONObject;
import com.example.bishe.toolclass.JsonValue;
import com.example.bishe.toolclass.LoginUser;
import com.example.bishe.toolclass.StringTurnJson;
import io.swagger.annotations.ApiParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

@RestController
@RequestMapping("/UPLogin")
public class UsernamePasswordAuthentication {
    @Resource
    LoginUser loginUser;
    @Resource
    StringTurnJson stj;
    @Resource
    JsonValue jv;
    @PostMapping("/login")
    public void UPLogin(@RequestBody Map<String, String> map){
        Set<String> strings = map.keySet();
        for (String s:strings) {
            System.out.println(s+" "+map.get(s));
        }
        //loginUser.login(username,password);
    }
}
